<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'node-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>
	
	<div class="row">
		<?php echo $form->hiddenField($model,'tid'); ?>
		<?php echo $form->error($model,'tid'); ?>
	</div>
	
	<div class="row"  style = "float: left; margin-right: 10px;">
		<?php echo "分类：".$form->dropDownList($model,'cid', CHtml::listData($cats, 'id', 'name')); ?>
		<?php echo $form->error($model,'cid'); ?>
	</div>

	<div class="row" style="float: left; margin-right: 10px;" >
		<?php echo "权限：".$form->dropDownList($model,'access', DefineBox::$nodeAccessArray); ?>
		<?php echo $form->error($model,'access'); ?>
	</div>
	


	<div class = "clear"></div>

	<div class="row" >
		<?php echo "名称：".$form->textField($model,'title',array('size'=>50,'maxlength'=>50))."（必需）"; ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo "标签：".$form->textField($virtual,'tag',array('size'=>104,'maxlength'=>50)); ?>
		<?php echo $form->error($virtual,'tag'); ?>
	</div>
	
	<div class="row">
		<?php 
			$this->widget('ext.ckeditor.CKEditorWidget',array(
			  "model"=>$model,                 # Data-Model
			  "attribute"=>'body',          # Attribute in the Data-Model
			  "defaultValue"=>$model->body,     # Optional
			  # Additional Parameter (Check http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html)
			  "config" => array(
			      "height"=>"300px",
			      "width"=>"94.3%",
			      "toolbar"=>"Rich",
			      ),
			  #Optional address settings if you did not copy ckeditor on application root
			  "ckEditor"=>Yii::app()->basePath."/../ckeditor/ckeditor.php",
			                                  # Path to ckeditor.php
			  "ckBasePath"=>Yii::app()->baseUrl."/ckeditor/",
			                                  # Realtive Path to the Editor (from Web-Root)
			  ) );
		?>
		<?php echo $form->error($model,'body'); ?>
	</div>

	<div class="row">
		<?php echo "地点：".$form->textField($virtual,'scene',array('size'=>104,'maxlength'=>50)); ?>
		<?php echo $form->error($virtual,'scene'); ?>
	</div>
	
	<div class="row">
		<?php echo "角色：".$form->textField($virtual,'role',array('size'=>104,'maxlength'=>50)); ?>
		<?php echo $form->error($virtual,'role'); ?>
	</div>
	
	<div class="row">
		<?php echo "物具：".$form->textField($virtual,'object',array('size'=>104,'maxlength'=>50)); ?>
		<?php echo $form->error($virtual,'object'); ?>
	</div>
		
	<div class="row">
		<?php echo "知识：".$form->textField($virtual,'pedia',array('size'=>104,'maxlength'=>50)); ?>
		<?php echo $form->error($virtual,'pedia'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '更新'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
